package com.sky.config;

import com.sky.properties.BaiDuProperties;
import com.sky.utils.BaiDuUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Slf4j
public class BaiDuUtilsConfiguration {

    @Bean
    public BaiDuUtils newBaiDuUtils(BaiDuProperties baiDuProperties) {
        log.info("开始初始化百度定位计算工具类");
        return new BaiDuUtils(baiDuProperties.getAddress(),baiDuProperties.getBaiduKey());
    }
}
